The present invention relates to a storage device and a storage subsystem comprised of the storage device and a storage controller.
In addition to a disk device, a magnetic tape or an optical storage device is often used as a storage device in a computer system. Recently, a digital video disk (DVD) has particularly been highlighted.
The DVD is a storage medium suitable for storing data of a large scale such as a voice, an image or a moving picture. As the need for processing large scale data in multi-media increases, realization of increasing performance,increasing reliability and increasing availability is much thought of.
A literature "A Case for Redundant Arrays of Inexpensive Disks (RAID)" by D. Patterson et al, ACM SIGMOD conference proceeding, Chicago, Ill., Jun. 1-3, 1988, pp. 109-116 discloses a technique for data arrangement on a disk array.
The disk array is a mechanism for realization of increasing performance and increasing reliability in a disk system. In the disk array, to meet increasing performance, disk devices which are physically plural in number impersonate a single disk device for a processor unit. On the other hand, to meet increasing reliability, check information or redundant data for recovering data in the event that a disk device storing the data becomes faulty is stored in a different disk device.
Usually, data behaving as a read/write unit in the disk device is called a record and in the literature by Patterson, some methods for record arrangement are proposed. In the case where the disk array is used, however, a data length of a record representing a read/write unit as viewed from the processor unit sometimes differs from a data length of a record which is actually recorded in the disk device. Hereinafter, the former will be called a logical record and the latter will be called a physical record.
In the storage disk such as disk device, an error correcting code (ECC) serving as a code for error correction is added every constant recording unit when data is stored in a storage medium, thereby improving the reliability. For example, in a disk device of small computer system interface (SCSI), ECC's are generated and added to data at intervals of individual data pieces of 512 bytes and in the DVD, they are generated and added to data at intervals of individual data pieces of 32 Kbytes.
Accordingly, when data of desired size written by the data processor unit is written into the storage medium, an amount of data by which the written data is short of the ECC generation unit must once be read from the storage medium to a buffer, the read-out data must be combined with the write data to permit an ECC to be generated, and the combined data and the ECC must be written to the storage medium. Consequently, a long time is required for the write processing.
A similar problem arises in an instance where the technique of redundant arrays of inexpensive disk (RAID) is applied to storage devices.
In the RAID, consecutive data written by the data processor unit is divided into a plurality of physical records, which are stored in corresponding storage media. These physical records to be stored will hereinafter be called data records. Then, check information pieces or redundant data pieces are generated in association with the plurality of data records and a check information piece is stored in a physical record of a different storage medium. Hereinafter, the check information is called a parity, the physical record for storing the parity is called a parity record and a gang of the parity record and some corresponding data records is called a parity group.
In the RAID, too, when the data record and the parity record are to be stored in the corresponding storage media, ECC's are generated and added. At that time, if the physical record does not neatly fill up the ECC generation unit, a shortage of data must be read out of the storage medium. For example, on the assumption that the physical data size is 80 Kbytes in the case of a DVD having an ECC generation unit of 32 Kbytes, ECC's can be generated for initial 64 Kbytes by using only write data but for the remaining 16 Kbytes, data or parity of 16 Kbytes corresponding to a shortage must be read out of the storage medium.
As will be seen from the above, in operation of write to the storage device such as DVD, data or parity short of the ECC generation unit must be read out of the storage medium and consequently, data which is essentially superfluous must be transferred. Disadvantageously, this degrades the performance of the whole of the storage subsystem when the load on the storage device increases.